﻿@*Pas ook _Menu.cshtml aan wanneer je deze aan past!*@

<script type="text/javascript">
    $(function () {
        $("input#searchbar_zoekuser").autocomplete({
            url: '@Url.Action("GetUserNames", "ADUser")',
            minChars: 4,
            delay: 1200
        });
    });

        $(document).ready(function () {

            var text = "Geef usernaam...";

            $("#searchbar_zoekuser").focus(function () {
                $(this).addClass("active");
                if ($(this).attr("value") == text) $(this).attr("value", "");
            });

            $("#searchbar_zoekuser").blur(function () {
                $(this).removeClass("active");
                if ($(this).attr("value") == "") $(this).attr("value", text);
            });
        });
    
</script>
    
<div style="background-color:#DDDDDD; padding-top:10px; padding-bottom:40px; padding-left:10px;"> 
@{
    using (Html.BeginForm("ZoekADUser", "ADUser"))
    {
        @Html.TextBox("searchbar_zoekuser", "Geef usernaam...", new { @autocomplete = "off", @class = "searchbar"}) <button id="searchbtn" type="submit" > Zoek user... </button> 
    }
}
</div>